package com.kr.redeye.member;

import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.kr.redeye.common.dao.CommonDAO;
import com.kr.redeye.dto.FunctionTableDto;
import com.kr.redeye.dto.MemberTableDto;

@Repository("memberDao")
public class MemberDao  extends CommonDAO {
	
	public int checkMember(MemberTableDto param) {
		return (Integer)getSqlMapClientTemplate().queryForObject("member.checkMember", param);
	}
	public int insert(MemberTableDto param) {
		return (Integer)getSqlMapClientTemplate().insert("member.insert", param);
	}
	public MemberTableDto checkLogin(MemberTableDto param) {
		return (MemberTableDto)getSqlMapClientTemplate().queryForObject("member.checkLogin", param);	
	}

	
	public int upd(FunctionTableDto param) {
		return getSqlMapClientTemplate().update("nsFunction.upd", param);
	}
	
	public int del(FunctionTableDto param) {
		return getSqlMapClientTemplate().update("nsFunction.del", param);
	}
	
	@SuppressWarnings("unchecked")
	public List<HashMap<String, String>> getList(FunctionTableDto param) {
		return (List<HashMap<String, String>>)getSqlMapClientTemplate().queryForList("nsFunction.getList", param);
	}
	
	
}
